/**
 * Created by LMN on 2016/7/14.
 */
var io= require('socket.io');

module.exports = {
    listen: function(server){
        io = io.listen(server);
        io.sockets.on('connection', function(){
        //    console.log(io.sockets.connected);
        });
    },
    send: function(url, msgobj){
        for(var id in io.sockets.connected){
            io.sockets.connected[id].emit(url,msgobj);
        }
    }
};